<script>
  window.parent.dialog_.close();
  window.parent.ed_.insertImage('<%= @attachment.public_filename %>');
</script>